package com.polaris.live.ui.party.widget.seat.party_seat.view

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import com.polaris.live.databinding.WidgetPartyEmperorSeatBinding
import com.polaris.live.ui.party.widget.seat.base.BaseSeatItemView
import com.polaris.live.ui.party.widget.seat.base.BaseSeatView

/**
 * EmperorSeatView 帝王房
 * @author Created by 天晴 on 2024/9/9 16:28
 * @since 1.0.0
 **/
class EmperorSeatView(context: Context, attrs: AttributeSet?) :
    BaseSeatView(context, attrs) {

    val mBinding = WidgetPartyEmperorSeatBinding.inflate(LayoutInflater.from(context), this)

    init {
        initView()
        clipChildren = false
        clipToPadding = false
    }

    override fun getSeatCount(): Int {
        return 11
    }

    override fun createView(seatId: Int): BaseSeatItemView {
        return when (seatId) {
            0 -> mBinding.seat1
            1 -> mBinding.seat2
            2 -> mBinding.seat3
            3 -> mBinding.seat4
            4 -> mBinding.seat5
            5 -> mBinding.seat6
            6 -> mBinding.seat7
            7 -> mBinding.seat8
            8 -> mBinding.seat9
            9 -> mBinding.seat10
            10 -> mBinding.seat11
            else -> throw Exception("no SeatItemView")
        }
    }

}